<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<html>
<head>
    <title>Registration Data</title>
</head>
<body>
    <h1>Registered Users</h1>
    <table border="1">
        <tr>
            <th>ID Number</th>
            <th>Name</th>
            <th>Birthdate</th>
            <th>Phone Number</th>
            <th>Region</th>
            <th>Address</th>
        </tr>
        <%
            List<String[]> records = (List<String[]>) request.getAttribute("records");
            System.out.println("Records: " + records);
            if (records != null) {
                for (String[] record : records) {
                    out.println("<tr>");
                    for (String field : record) {
                        out.println("<td>" + field + "</td>");
                    }
                    out.println("</tr>");
                }
            } else {
                out.println("<tr><td colspan='6'>No records found.</td></tr>");
            }
        %>
    </table>
</body>
</html>
